package com.fyzk.model;

import android.view.View;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import http.DataUtil.text.TextUtil;

public class JCLQMatchData implements Serializable {

    /**
     * matchNum : 20160901301
     * homeTeam : 印第安纳狂热
     * awayTeam : 纽约自由
     * matchName : 美职女篮
     * endSaleTime : 1472745300000
     * officialWeekDay : 周四
     * handicap : +1.5
     * presetScore : +157.5
     * vs_0 : 1.64
     * vs_3 : 1.88
     * staticSaleSfStatus : 2
     * dgStaticSaleSfStatus : 1
     * letvs_0 : 1.75
     * letvs_3 : 1.75
     * staticSaleRfsfStatus : 2
     * dgStaticSaleRfsfStatus : 2
     * sfc_01 : 4.25
     * sfc_02 : 4.4
     * sfc_03 : 8.4
     * sfc_04 : 17.0
     * sfc_05 : 36.0
     * sfc_06 : 48.0
     * sfc_11 : 4.0
     * sfc_12 : 4.05
     * sfc_13 : 7.35
     * sfc_14 : 13.5
     * sfc_15 : 28.0
     * sfc_16 : 38.0
     * staticSaleSfcStatus : 2
     * dgStaticSaleSfcStatus : 2
     * dxf_1 : 1.75
     * dxf_2 : 1.75
     * staticSaleDxfStatus : 2
     * dgStaticSaleDxfStatus : 1
     */

    public View hideView;// 隐藏的view
    public boolean isAddhideView;// 隐藏的view

    public boolean isShowHideView = false;

    private boolean isDan = false;

    private int sfcNum = 0;
    private String matchNum;
    private String homeTeam;
    private String awayTeam;
    private String matchName;
    private long endSaleTime;
    private String officialWeekDay;
    private String handicap;
    private String presetScore;
    private String vs_0;
    private String vs_3;
    private int staticSaleSfStatus;
    private int dgStaticSaleSfStatus;
    private String letvs_0;
    private String letvs_3;
    private int staticSaleRfsfStatus;
    private int dgStaticSaleRfsfStatus;
    private String sfc_01;
    private String sfc_02;
    private String sfc_03;
    private String sfc_04;
    private String sfc_05;
    private String sfc_06;
    private String sfc_11;
    private String sfc_12;
    private String sfc_13;
    private String sfc_14;
    private String sfc_15;
    private String sfc_16;
    private int staticSaleSfcStatus;
    private int dgStaticSaleSfcStatus;
    private String dxf_1;
    private String dxf_2;
    private int staticSaleDxfStatus;
    private int dgStaticSaleDxfStatus;

    public JCLQMatchData() {
        // TODO Auto-generated constructor stub
        // btnHGPojo = new HashMap<String, SPInfo>();
    }

    @Override
    public String toString() {
        return "JCLQMatchData{" +
                "hideView=" + hideView +
                ", isAddhideView=" + isAddhideView +
                ", isShowHideView=" + isShowHideView +
                ", isDan=" + isDan +
                ", sfcNum=" + sfcNum +
                ", matchNum='" + matchNum + '\'' +
                ", homeTeam='" + homeTeam + '\'' +
                ", awayTeam='" + awayTeam + '\'' +
                ", matchName='" + matchName + '\'' +
                ", endSaleTime=" + endSaleTime +
                ", officialWeekDay='" + officialWeekDay + '\'' +
                ", handicap='" + handicap + '\'' +
                ", presetScore='" + presetScore + '\'' +
                ", vs_0='" + vs_0 + '\'' +
                ", vs_3='" + vs_3 + '\'' +
                ", staticSaleSfStatus=" + staticSaleSfStatus +
                ", dgStaticSaleSfStatus=" + dgStaticSaleSfStatus +
                ", letvs_0='" + letvs_0 + '\'' +
                ", letvs_3='" + letvs_3 + '\'' +
                ", staticSaleRfsfStatus=" + staticSaleRfsfStatus +
                ", dgStaticSaleRfsfStatus=" + dgStaticSaleRfsfStatus +
                ", sfc_01='" + sfc_01 + '\'' +
                ", sfc_02='" + sfc_02 + '\'' +
                ", sfc_03='" + sfc_03 + '\'' +
                ", sfc_04='" + sfc_04 + '\'' +
                ", sfc_05='" + sfc_05 + '\'' +
                ", sfc_06='" + sfc_06 + '\'' +
                ", sfc_11='" + sfc_11 + '\'' +
                ", sfc_12='" + sfc_12 + '\'' +
                ", sfc_13='" + sfc_13 + '\'' +
                ", sfc_14='" + sfc_14 + '\'' +
                ", sfc_15='" + sfc_15 + '\'' +
                ", sfc_16='" + sfc_16 + '\'' +
                ", staticSaleSfcStatus=" + staticSaleSfcStatus +
                ", dgStaticSaleSfcStatus=" + dgStaticSaleSfcStatus +
                ", dxf_1='" + dxf_1 + '\'' +
                ", dxf_2='" + dxf_2 + '\'' +
                ", staticSaleDxfStatus=" + staticSaleDxfStatus +
                ", dgStaticSaleDxfStatus=" + dgStaticSaleDxfStatus +
                ", VS_3='" + VS_3 + '\'' +
                ", VS_0='" + VS_0 + '\'' +
                ", LETVS_3='" + LETVS_3 + '\'' +
                ", LETVS_0='" + LETVS_0 + '\'' +
                ", DXF_1='" + DXF_1 + '\'' +
                ", DXF_2='" + DXF_2 + '\'' +
                ", SFC_01='" + SFC_01 + '\'' +
                ", SFC_02='" + SFC_02 + '\'' +
                ", SFC_03='" + SFC_03 + '\'' +
                ", SFC_04='" + SFC_04 + '\'' +
                ", SFC_05='" + SFC_05 + '\'' +
                ", SFC_06='" + SFC_06 + '\'' +
                ", SFC_11='" + SFC_11 + '\'' +
                ", SFC_12='" + SFC_12 + '\'' +
                ", SFC_13='" + SFC_13 + '\'' +
                ", SFC_14='" + SFC_14 + '\'' +
                ", SFC_15='" + SFC_15 + '\'' +
                ", SFC_16='" + SFC_16 + '\'' +
                ", sfc_isZhanKai=" + sfc_isZhanKai +
                ", clickNum=" + clickNum +
                ", plInfos=" + plInfos +
                ", splInfos=" + splInfos +
                '}';
    }

    public final String VS_3 = "vs_3";
    public final String VS_0 = "vs_0";
    public final String LETVS_3 = "letvs_3";
    public final String LETVS_0 = "letvs_0";
    public final String DXF_1 = "dxf_1";
    public final String DXF_2 = "dxf_2";
    public final String SFC_01 = "sfc_01";
    public final String SFC_02 = "sfc_02";
    public final String SFC_03 = "sfc_03";
    public final String SFC_04 = "sfc_04";
    public final String SFC_05 = "sfc_05";
    public final String SFC_06 = "sfc_06";
    public final String SFC_11 = "sfc_11";
    public final String SFC_12 = "sfc_12";
    public final String SFC_13 = "sfc_13";
    public final String SFC_14 = "sfc_14";
    public final String SFC_15 = "sfc_15";
    public final String SFC_16 = "sfc_16";

    private static final long serialVersionUID = 1L;
    public static final String RESULT = "";
    public boolean sfc_isZhanKai = false;
    public int clickNum = 0;

    public void sortPlInfos() {
        if (!TextUtil.isEmpty(vs_3)) {
            SPInfo S = this.getPLInfo("主胜", vs_3, false, "3");
            this.plInfos.add(S);
            this.splInfos.put(VS_3, S);
        }
        if (!TextUtil.isEmpty(vs_0)) {
            SPInfo F = this.getPLInfo("客胜", vs_0, false, "0");
            this.plInfos.add(F);
            this.splInfos.put(VS_0, F);
        }
        if (!TextUtil.isEmpty(letvs_3)) {
            SPInfo RS = this.getPLInfo("让分主胜", letvs_3, false, "3");
            this.plInfos.add(RS);
            this.splInfos.put(LETVS_3, RS);
        }
        if (!TextUtil.isEmpty(letvs_0)) {
            SPInfo RF = this.getPLInfo("让分客胜", letvs_0, false, "0");
            this.plInfos.add(RF);
            this.splInfos.put(LETVS_0, RF);
        }
        if (!TextUtil.isEmpty(dxf_1)) {
            SPInfo DXF1Sp = this.getPLInfo("大 ",
                    dxf_1, false, "1");
            this.plInfos.add(DXF1Sp);
            this.splInfos.put(DXF_1, DXF1Sp);
        }
        if (!TextUtil.isEmpty(dxf_2)) {
            SPInfo DXF2Sp = this.getPLInfo("小 ",
                    dxf_2, false, "2");
            this.plInfos.add(DXF2Sp);
            this.splInfos.put(DXF_2, DXF2Sp);
        }
        if (!TextUtil.isEmpty(sfc_01)) {
            SPInfo sfc01sp = this.getPLInfo("主胜1-5",
                    sfc_01, false, "01");
            this.plInfos.add(sfc01sp);
            this.splInfos.put(SFC_01, sfc01sp);
        }
        if (!TextUtil.isEmpty(sfc_02)) {
            SPInfo sfc02sp = this.getPLInfo("主胜6-10",
                    sfc_02, false, "02");
            this.plInfos.add(sfc02sp);
            this.splInfos.put(SFC_02, sfc02sp);
        }
        if (!TextUtil.isEmpty(sfc_03)) {
            SPInfo sfc03sp = this.getPLInfo("主胜11-15",
                    sfc_03, false, "03");
            this.plInfos.add(sfc03sp);
            this.splInfos.put(SFC_03, sfc03sp);
        }
        if (!TextUtil.isEmpty(sfc_04)) {
            SPInfo sfc04sp = this.getPLInfo("主胜16-20",
                    sfc_04, false, "04");
            this.plInfos.add(sfc04sp);
            this.splInfos.put(SFC_04, sfc04sp);
        }
        if (!TextUtil.isEmpty(sfc_05)) {
            SPInfo sfc05sp = this.getPLInfo("主胜21-25",
                    sfc_05, false, "05");
            this.plInfos.add(sfc05sp);
            this.splInfos.put(SFC_05, sfc05sp);
        }
        if (!TextUtil.isEmpty(sfc_06)) {
            SPInfo sfc06sp = this.getPLInfo("主胜26+",
                    sfc_06, false, "06");
            this.plInfos.add(sfc06sp);
            this.splInfos.put(SFC_06, sfc06sp);
        }
        if (!TextUtil.isEmpty(sfc_11)) {
            SPInfo sfc11sp = this.getPLInfo("客胜1-5",
                    sfc_11, false, "11");
            this.plInfos.add(sfc11sp);
            this.splInfos.put(SFC_11, sfc11sp);
        }
        if (!TextUtil.isEmpty(sfc_12)) {
            SPInfo sfc12sp = this.getPLInfo("客胜6-10",
                    sfc_12, false, "12");
            this.plInfos.add(sfc12sp);
            this.splInfos.put(SFC_12, sfc12sp);
        }
        if (!TextUtil.isEmpty(sfc_13)) {
            SPInfo sfc13sp = getPLInfo("客胜11-15",
                    sfc_13, false, "13");
            this.plInfos.add(sfc13sp);
            this.splInfos.put(SFC_13, sfc13sp);
        }
        if (!TextUtil.isEmpty(sfc_14)) {
            SPInfo sfc14sp = this.getPLInfo("客胜16-20",
                    this.sfc_14, false, "14");
            this.plInfos.add(sfc14sp);
            this.splInfos.put(SFC_14, sfc14sp);
        }
        if (!TextUtil.isEmpty(sfc_15)) {
            SPInfo sfc15sp = this.getPLInfo("客胜21-25",
                    sfc_15, false, "15");
            this.plInfos.add(sfc15sp);
            this.splInfos.put(SFC_15, sfc15sp);
        }
        if (!TextUtil.isEmpty(sfc_16)) {
            SPInfo sfc16sp = this.getPLInfo("客胜26+",
                    sfc_16, false, "16");
            this.plInfos.add(sfc16sp);
            this.splInfos.put(SFC_16, sfc16sp);
        }
    }

    /**
     * 赔率集合(0-1:非让分；2-3:让分；4-9:主胜；10-15:客胜；16-17:大小分)
     */
    public List<SPInfo> plInfos = new ArrayList<>();
    public Map<String, SPInfo> splInfos = new HashMap<>();

    public SPInfo getPLInfo(String str, String pl, boolean isChecked,
                            String code) {
        return new SPInfo(str, pl, isChecked, code);
    }

    public String getMatchNum() {
        return matchNum;
    }

    public void setMatchNum(String matchNum) {
        this.matchNum = matchNum;
    }

    public String getHomeTeam() {
        return homeTeam;
    }

    public void setHomeTeam(String homeTeam) {
        this.homeTeam = homeTeam;
    }

    public String getAwayTeam() {
        return awayTeam;
    }

    public void setAwayTeam(String awayTeam) {
        this.awayTeam = awayTeam;
    }

    public String getMatchName() {
        return matchName;
    }

    public void setMatchName(String matchName) {
        this.matchName = matchName;
    }

    public long getEndSaleTime() {
        return endSaleTime;
    }

    public void setEndSaleTime(long endSaleTime) {
        this.endSaleTime = endSaleTime;
    }

    public String getOfficialWeekDay() {
        return officialWeekDay;
    }

    public void setOfficialWeekDay(String officialWeekDay) {
        this.officialWeekDay = officialWeekDay;
    }

    public String getHandicap() {
        return handicap;
    }

    public void setHandicap(String handicap) {
        this.handicap = handicap;
    }

    public String getPresetScore() {
        return presetScore;
    }

    public void setPresetScore(String presetScore) {
        this.presetScore = presetScore;
    }

    public String getVs_0() {
        return vs_0;
    }

    public void setVs_0(String vs_0) {
        this.vs_0 = vs_0;
    }

    public String getVs_3() {
        return vs_3;
    }

    public void setVs_3(String vs_3) {

        this.vs_3 = vs_3;
    }

    public int getStaticSaleSfStatus() {
        return staticSaleSfStatus;
    }

    public void setStaticSaleSfStatus(int staticSaleSfStatus) {
        this.staticSaleSfStatus = staticSaleSfStatus;
    }

    public int getDgStaticSaleSfStatus() {
        return dgStaticSaleSfStatus;
    }

    public void setDgStaticSaleSfStatus(int dgStaticSaleSfStatus) {
        this.dgStaticSaleSfStatus = dgStaticSaleSfStatus;
    }

    public String getLetvs_0() {
        return letvs_0;
    }

    public void setLetvs_0(String letvs_0) {
        this.letvs_0 = letvs_0;
    }

    public String getLetvs_3() {
        return letvs_3;
    }

    public void setLetvs_3(String letvs_3) {


        this.letvs_3 = letvs_3;
    }

    public int getStaticSaleRfsfStatus() {
        return staticSaleRfsfStatus;
    }

    public void setStaticSaleRfsfStatus(int staticSaleRfsfStatus) {
        this.staticSaleRfsfStatus = staticSaleRfsfStatus;
    }

    public int getDgStaticSaleRfsfStatus() {
        return dgStaticSaleRfsfStatus;
    }

    public void setDgStaticSaleRfsfStatus(int dgStaticSaleRfsfStatus) {
        this.dgStaticSaleRfsfStatus = dgStaticSaleRfsfStatus;
    }

    public String getSfc_01() {
        return sfc_01;
    }

    public void setSfc_01(String sfc_01) {
        this.sfc_01 = sfc_01;
    }

    public String getSfc_02() {
        return sfc_02;
    }

    public void setSfc_02(String sfc_02) {

        this.sfc_02 = sfc_02;
    }

    public String getSfc_03() {
        return sfc_03;
    }

    public void setSfc_03(String sfc_03) {
        this.sfc_03 = sfc_03;
    }

    public String getSfc_04() {
        return sfc_04;
    }

    public void setSfc_04(String sfc_04) {
        this.sfc_04 = sfc_04;
    }

    public String getSfc_05() {
        return sfc_05;
    }

    public void setSfc_05(String sfc_05) {
        this.sfc_05 = sfc_05;
    }

    public String getSfc_06() {
        return sfc_06;
    }

    public void setSfc_06(String sfc_06) {
        this.sfc_06 = sfc_06;
    }

    public String getSfc_11() {
        return sfc_11;
    }

    public void setSfc_11(String sfc_11) {
        this.sfc_11 = sfc_11;
    }

    public String getSfc_12() {
        return sfc_12;
    }

    public void setSfc_12(String sfc_12) {
        this.sfc_12 = sfc_12;
    }

    public String getSfc_13() {
        return sfc_13;
    }

    public void setSfc_13(String sfc_13) {
        this.sfc_13 = sfc_13;
    }


    public String getSfc_14() {
        return sfc_14;
    }

    public void setSfc_14(String sfc_14) {
        this.sfc_14 = sfc_14;
    }


    public String getSfc_15() {
        return sfc_15;
    }

    public void setSfc_15(String sfc_15) {
        this.sfc_15 = sfc_15;
    }

    public String getSfc_16() {
        return sfc_16;
    }

    public void setSfc_16(String sfc_16) {
        this.sfc_16 = sfc_16;
    }

    public int getStaticSaleSfcStatus() {
        return staticSaleSfcStatus;
    }

    public void setStaticSaleSfcStatus(int staticSaleSfcStatus) {
        this.staticSaleSfcStatus = staticSaleSfcStatus;
    }

    public int getDgStaticSaleSfcStatus() {
        return dgStaticSaleSfcStatus;
    }

    public void setDgStaticSaleSfcStatus(int dgStaticSaleSfcStatus) {
        this.dgStaticSaleSfcStatus = dgStaticSaleSfcStatus;
    }

    public String getDxf_1() {
        return dxf_1;
    }

    public void setDxf_1(String dxf_1) {
        this.dxf_1 = dxf_1;
    }

    public String getDxf_2() {
        return dxf_2;
    }

    public void setDxf_2(String dxf_2) {
        this.dxf_2 = dxf_2;
    }

    public int getStaticSaleDxfStatus() {
        return staticSaleDxfStatus;
    }

    public void setStaticSaleDxfStatus(int staticSaleDxfStatus) {
        this.staticSaleDxfStatus = staticSaleDxfStatus;
    }

    public int getDgStaticSaleDxfStatus() {
        return dgStaticSaleDxfStatus;
    }

    public void setDgStaticSaleDxfStatus(int dgStaticSaleDxfStatus) {
        this.dgStaticSaleDxfStatus = dgStaticSaleDxfStatus;
    }

    public boolean isDan() {
        return isDan;
    }

    public void setDan(boolean dan) {
        isDan = dan;
    }

    public int getSfcNum() {
        return sfcNum;
    }

    public void setSfcNum(int sfcNum) {
        this.sfcNum = sfcNum;
    }


    /**
     * 竞彩篮球 赔率信息
     *
     * @author fxs
     */
    public class SPInfo implements Serializable,Cloneable {
        public String str = "";
        public String spValue = "";
        public boolean isSel = false;
        public String codeValue = "";

        @Override
        public String toString() {
            return "SPInfo{" +
                    "str='" + str + '\'' +
                    ", spValue='" + spValue + '\'' +
                    ", isSel=" + isSel +
                    ", codeValue='" + codeValue + '\'' +
                    '}';
        }

        public SPInfo(String str, String pl, boolean isSel, String codeValue) {
            this.str = str;
            this.spValue = pl;
            this.isSel = isSel;
            this.codeValue = codeValue;
        }

        @Override
        public SPInfo clone() throws CloneNotSupportedException {
            return (SPInfo) super.clone();
        }
    }

    public String getSFCResult() {
        String sfc_result = "";
        for (int i = 0; i < plInfos.size(); i++) {
            SPInfo info = plInfos.get(i);
            if (info.isSel) {
                sfc_result += info.str + " ";
            }
        }
        if (sfc_result.trim().equals("")) {
            sfc_result = RESULT;
        }
        return sfc_result;
    }

}
